<?php
    include('incs/database.inc.php');
	include('incs/config.inc.php');
	include('incs/function.inc.php');
	db_open();
	$query_s = "SELECT *
				FROM `bulan`";
	$hasil = db_query($query_s);
	if(empty($hasil))
		echo db_error();
    while($tampil_data = db_fetch_array($hasil)){
		$arrdata[] = $tampil_data;
	}
?>
<html>
<head>
    <script type="text/javascript" src="images/jquery.js"></script>
    <script type="text/javascript" src="images/cufon-yui.js"></script>
    <script type="text/javascript" src="images/Gotham_Book_400_font.js"></script>
    <script type="text/javascript">
        Cufon.replace('.gotham');
    </script>
    <link rel="stylesheet" type="text/css" href="images/sim.css" />
    <title>Sistem Informasi SIM - POLDA RIAU</title>
</head>
<body>
<div align="left">
    <br /><br /><br />
    <table border="0">
        <tr>
            <td valign="top"><img src="images/headersim.png" /></td>
            <td>&nbsp;&nbsp;&nbsp;<img src="images/bullet.gif" />&nbsp;&nbsp;&nbsp;</td>
            <td valign="middle">
            <br />
            <form name="table_cari" action="./lihat_data_4.php">
               <table width="100%" cellpadding="0" cellspacing="0">
                      <tr align="center">
                          <td>
                              <table>
                                <tr>
                                  <td class="gotham">
                                      Bulan
                                  </td>
                                  <td>&nbsp;</td>
                                  <td>
                                    <select name="bulan">
                                      <?php foreach($arrdata AS $dataBulan) { ?>
                                          <?php echo "<option value='$dataBulan[ID]'>$dataBulan[DESKRIPSI]</option>";?>
                                      <?php } ?>
                                    </select>
                                  </td>
                                  <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                                  <td class="gotham">
                                      Tahun
                                  </td>
                                  <td>&nbsp;</td>
                                  <td>
                                      <?php $tahun=date('Y');?>
                                    <select name="tahun">
                                      <?php
                                          for($thn=2012;$thn<=$tahun;$thn++) { ?>
                                          <?php echo "<option value='$thn'>$thn</option>";?>
                                      <?php } ?>
                                    </select>
                                  </td>
                                  <td>
                                      &nbsp;&nbsp;<button class="stdbtn" type="submit">CARI</button>
                                  </td>
                                </tr>
                            </table>
                          </td>
                      </tr>
             </table>
            </form>
            </td>
        </tr>
    </table>
    <br /><br />
</div>
</body>
</html>